package com.lexandro.lemuplayerbot;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.lexandro.lemuplayerbot.configuration.AppConfig;
import com.lexandro.lemuplayerbot.service.LemuPlayerBotService;

public class Main {

	private static Main application;

	private ApplicationContext applicationContext;

	public static void main(String[] args) {
		application = new Main();
		application.start();
	}

	public void start() {
		setupApplicationContext();
		LemuPlayerBotService lemubotService = (LemuPlayerBotService) applicationContext.getBean("lemuPlayerBotService");
		lemubotService.start();
	}

	private void setupApplicationContext() {
		applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
	}
}
